package com.luyue.zagj.utils;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;

import com.luyue.zagj.R;

/**
 * Created by Chen qin lang on 2016/12/18.
 * 邮箱 :   619766577@qq.com
 */
public class DrawableUtil {
    public static Drawable getDrawable(Context context){
        Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.mipmap.ac_car_mana);
        Canvas canvas=new Canvas(bitmap);
        Paint paint=new Paint();
        paint.setAntiAlias(true);
        canvas.drawBitmap(bitmap,10,10,paint);
        Drawable drawable=new BitmapDrawable(bitmap);
        return drawable;
    }
}
